package com.molichuxing.gateway.bff.dealer.entity.request.modify;

import com.molichuxing.framework.dto.RequestRootDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * <p>
 * 经销商信息修改
 * </p>
 *
 * @author zph
 * @since 2019-08-26
 */
@Data
public class DealerModifyVo extends RequestRootDto {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "经销商ID")
    @NotNull(message = "请选择经销商")
    private Integer dealerId;

    @ApiModelProperty(value = "经销商名称")
    @NotBlank(message = "请输入经销商名称")
    @Length(min = 3, max = 10, message = "经销商名称最少3个字符，最多10个字符")
    private String shortName;

    @ApiModelProperty(value = "经销商全称")
    @NotBlank(message = "请输入经销商全称")
    @Length(min = 3, max = 50, message = "经销商全称最少3个字符，最多50个字符")
    private String fullName;

    @ApiModelProperty(value = "经销商类型(1:直销，2：分销)")
    @NotNull(message = "请选择经销商类型")
    private Integer type;

    @ApiModelProperty(value = "区域ID")
    private Integer regionId;

    @ApiModelProperty(value = "电子签章Base64")
    private String esignBase64;

    @ApiModelProperty(value = "法人姓名")
    private String legalPerson;

    @ApiModelProperty(value = "详细地址")
    private String address;

    @ApiModelProperty(value = "营业执照号")
    private String businessLicenseNo;

    @ApiModelProperty(value = "纳税人识别号")
    private String taxpayerIdNo;

    @ApiModelProperty(value = "开户行")
    private String accountBank;

    @ApiModelProperty(value = "对公账号")
    private String bankNumber;

    @ApiModelProperty(value = "负责人姓名")
    private String responsibleName;

    @ApiModelProperty(value = "负责人电话")
    private String responsiblePhone;

    @ApiModelProperty(value = "联系电话")
    private String contactPhone;

    @ApiModelProperty(value = "营业执照图片url")
    private String businessLicenseUrl;

    @ApiModelProperty(value = "横向文内容")
    @Length(max = 8, message = "横向文内容不能超过8个字符")
    private String horizontalText;

    @ApiModelProperty(value = "上弦文内容")
    private String upperChord;

    @ApiModelProperty(value = "下弦文内容")
    @NotBlank(message = "请输入下弦文内容")
    private String bottomChord;

    @ApiModelProperty(value = "邮箱")
    @NotBlank(message = "请输入邮箱")
    @Pattern(regexp = "^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z0-9]{2,6}$",message = "邮箱格式错误！请重新输入")
    private String email;

    @ApiModelProperty(value = "所属分子公司ID")
    @NotNull(message = "请选择所属分子公司")
    private Integer subcompanyId;
}
